Repository navigation
Conversation
…o numeric aliases
…etryable without callback deadlocks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fix shutdown of the shared streaming listener bus. For example, external
streams.close()can wait for a callback while the callback waits to remove itself. Lifecycle RPCs and worker joins now run outside the registry lock. Ordinary failed removal or close preserves retry state.Terminal stop cancels local registration/dispatch, releases the server session, then closes the client even if release fails. Client close cancels locally without releasing the server session. Workers hold weak bus references, and progress tracking shares its handler registry while retaining recursion limits.
Preserve upstream duplicate-registration, foreign-session removal and synchronous-start behavior. Consume one Python registration ID only after completed removal, and protect newer registrations from older worker generations.
Why are the changes needed?
SPARK-61097. Callback shutdown can deadlock, failed close can discard retry state, and a quiet worker can retain session ownership.
Includes the NumPy prerequisite (SPARK-61102).
Does this PR introduce any user-facing change?
Yes. Listener teardown avoids callback waits, ordinary removal failures remain retryable, and terminal teardown cancels quiet dispatch. A current event snapshot may finish afterward. Acknowledgement cancellation begins after stream establishment; initial establishment retains transport deadlines/retries. Clearing registrations after clean stream end is a robustness behavior, not established official parity. Listener-held session cycles and event-error warning parity remain limitations.
How was this patch tested?
On final source
ad40f31:The unchanged metadata-column manifest entry still failed a separate advisory check because its test catalog plugin was unavailable (one failure, 57 deselections). The original NumPy full run's seeded-random failure remains recorded: the unchanged test failed identically across official Python and both saved Rust transports on two threads, then passed in all three on its default four-thread fixture, used by the complete reruns.
Full/cluster checks use official Python plans/converters over the respective native raw transports, without per-child import attestation. They do not validate native high-level Row/literal/config/listener behavior, native ReleaseSession or native artifact upload. The recursion subprocess also lacks separate import telemetry. Logs retain deliberate worker crashes, negative tests, in-test query restarts, cursor errors and shutdown races. Direct successful server shutdown was recorded without universal descendant-process telemetry.
Clippy remains advisory exit 101 with 144 lint errors in unchanged source regions. A fresh baseline/equal-coverage comparison is unavailable. Linux, Windows and the newest-master combined tree were not runtime tested locally.
Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex
This pull request and its description were written by OpenAI Codex.